const {app, BrowserWindow} = require('electron')

const windowIndex = require('./windows/index')

app.whenReady().then(() => {

  windowIndex.createIndex()

  app.on('activate', () => {
    if (BrowserWindow.getAllWindows().length === 0) {
      windowIndex.createIndex()
    }
  })
})

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') {
    app.quit()
  }
})
